import 'package:dio/dio.dart' as dio;
import 'package:flutter_axrjc/datasource/network/request/network_service.dart';

class FeedBackApi {
  static Future submit(
      {required String feedbackType,
      required String feedbackContent,
      required String contactWay,
      required List<String> imgFile}) async {
    List<dio.MultipartFile> files = [];
    for (var element in imgFile) {
      files.add(await dio.MultipartFile.fromFile(element));
    }
    await NetworkService.post(
        url: 'app/proSysFeedBacksSave.do',
        map: {
          "feedbackType": feedbackType,
          "feedbackContent": feedbackContent,
          "contactWay": contactWay,
          "imgFile": files
        },
        useFormData: true);
  }
}
